
import { Column, Entity, PrimaryGeneratedColumn, CreateDateColumn, UpdateDateColumn } from "typeorm";


@Entity()
export default class StrategyEntity{
    @PrimaryGeneratedColumn()
    public id!: number;

    @Column()
    public userid: number;

    @Column({type: 'varchar', length: 16, default: ''})
    public symbol: string;

    @Column({type: 'text'})
    public strategy?: string;
    
    @Column({type: 'varchar', default: '', charset: "utf8mb4", collation: "utf8mb4_unicode_ci"})
    public name?: string;
    
    @CreateDateColumn({type: 'datetime', nullable: true})
    public ctime: Date;

    @UpdateDateColumn({type: 'datetime', nullable: true})
    public utime: Date;

    @Column({type: 'tinyint', default: 0})
    public is_deleted?: number;
}
